package com.tupian.web;


import com.tupian.Result;
import com.tupian.pojo.Userinfo;
import com.tupian.service.IUserinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.util.List;


/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author jobob
 * @since 2020-04-24
 */
@Controller
@RequestMapping("/user/userinfo")
public class UserinfoController {

    @Autowired
    IUserinfoService iUserinfoService;

    @GetMapping(value = "/image/insert")
    @ResponseBody
    public Result insert(MultipartFile file) throws IOException {

        iUserinfoService.saveOrUpdate(new Userinfo(1, "2", 3, "4", "5"));
        return Result.getSuccessResult();
    }
}
